package com.example.mobile2030606148tdh0427h;

import android.os.Bundle;
import android.widget.Button;
import android.widget.EditText;

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import java.util.ArrayList;
import java.util.List;

public class MainActivity extends AppCompatActivity {

    private EditText edtTextS;
    private Button button;
    private RecyclerView rvMainPaking;
    private List<Paking>list = new ArrayList();


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
       initData();
       rvMainPaking.setLayoutManager(new LinearLayoutManager(this));
       rvMainPaking.setAdapter(new PakingRVAdapter(list));
    }

    private void initView() {
        edtTextS = (EditText) findViewById(R.id.edt_text_s);
        button = (Button) findViewById(R.id.button);
        rvMainPaking = (RecyclerView) findViewById(R.id.rv_main_paking);
    }
    private void initData(){
        list.add(new Paking(R.drawable.picture_03,"国际大厦停车场","空位:30","5元/小时","10公里 ","佛山市"));
        list.add(new Paking(R.drawable.picture_03,"国际大厦停车场","空位:30","5元/小时","10公里 ","佛山市"));
        list.add(new Paking(R.drawable.picture_03,"国际大厦停车场","空位:30","5元/小时","10公里 ","佛山市"));
        list.add(new Paking(R.drawable.picture_03,"国际大厦停车场","空位:30","5元/小时","10公里 ","佛山市"));
        list.add(new Paking(R.drawable.picture_03,"国际大厦停车场","空位:30","5元/小时","10公里 ","佛山市"));
}

}